package com.dji.service.model;

import com.dji.bean.Autowired;
import com.dji.bean.Compoment;
import com.dji.bean.CompomentData;
import com.dji.system.core.nio.CommandExecute;

@Compoment
public class UserService {
	@Autowired
	private CommandExecute commandExecute;

	/**
	 * 校验登录用户
	 * 
	 * @param userName
	 * @param password
	 * @return
	 */
	public boolean login(String userName, String password) {
		CompomentData<Object> cmd = new CompomentData<Object>();
		cmd = commandExecute.request(cmd);
		if (CompomentData.SERVICE_SUCCESS.equals(cmd.getRetCode())) {
			return true;
		} else {
			return false;
		}
	}
}
